Skip to content

Remove orphaned senate/Triumvirate dead code from SDK#3294

Closed
dev-miro26 wants to merge 1 commit intoopentensor:masterfrom
dev-miro26:fix/remove-orphaned-senate-triumvirate-dead-code
Closed

Remove orphaned senate/Triumvirate dead code from SDK#3294
dev-miro26 wants to merge 1 commit intoopentensor:masterfrom
dev-miro26:fix/remove-orphaned-senate-triumvirate-dead-code

Conversation

@dev-miro26
Copy link

Fixes: #3282

Description of the Change

The senate/Triumvirate pallet was removed from the subtensor runtime, but the Python SDK still contained orphaned code referencing it. This PR removes all dead code tied to the Triumvirate pallet's Voting storage:

  • Removed get_vote_data() from Subtensor and AsyncSubtensor
  • Deleted ProposalVoteData dataclass and its module (proposal_vote_data.py)
  • Removed ProposalVoteData exports from chain_data/__init__.py and easy_imports.py
  • Removed get_vote_data wiring from Chain API wrapper
  • Removed 3 unit tests targeting the dead method in test_async_subtensor.py
  • Removed dead ProposalVoteData import and ~200 lines of commented-out senate tests from test_delegate.py
  • Removed propose, async_propose, vote, and async_vote Triumvirate helpers from e2e test utils

The deprecated ProxyType enum entries (Triumvirate, Senate, Governance, RootWeights) are intentionally kept for backward compatibility with historical on-chain proxy data.

Alternate Designs

A deprecation wrapper that raises NotImplementedError was considered, but since get_vote_data() already silently returns None or errors at the substrate level against the current chain, a clean removal is the safer and simpler path.

Possible Drawbacks

Any third-party code importing ProposalVoteData or calling get_vote_data() will break at import/call time. This is the desired behavior — failing loudly is preferable to silently returning None from a non-existent pallet.

Verification Process

  • Confirmed no remaining references to get_vote_data, ProposalVoteData, or proposal_vote_data in the codebase via project-wide search
  • Confirmed the only remaining Triumvirate/Senate references are the deprecated ProxyType enum values and a docstring in coldkey_swap.py

Release Notes

Removed dead senate/Triumvirate code (get_vote_data, ProposalVoteData) left over from the pallet's removal from the subtensor runtime.

Branch Acknowledgement

[x] I am acknowledging that I am opening this branch against staging

…cSubtensor and Subtensor classes, along with related tests and imports, to clean up deprecated code.
@dev-miro26
Copy link
Author

Hi, @thewhaleking @basfroman
Could you please review my first PR?
I appreciate you.

@thewhaleking
Copy link
Contributor

Hi, @thewhaleking @basfroman

Could you please review my first PR?

I appreciate you.

See #3283 (comment)

Also this is the same PR as #3283

@dev-miro26
Copy link
Author

dev-miro26 commented Mar 23, 2026

@thewhaleking
Could you check please?
PR_COMPARISON.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove orphaned senate/Triumvirate dead code from SDK

2 participants